#ifndef __LICENSE_OPT_H_
#define __LICENSE_OPT_H_

// Always enable 64 bit licensing
#define USE_DCMLICENSE
#ifdef USE_DCMLICENSE

	#ifndef INSTALLSHIELD

		#ifdef _MSC_VER
		#define UINT64(x) x##Ui64
		#else
		#define UINT64(x) x##ULL
		#endif


		#define  LIC_NOEXPIRE_BIT 24
		#define  LIC_NOTIMEOUT_BIT 25
		#define  LIC_REGISTERED_BIT 26
		#define  LIC_NOT_LITE_BIT 27
		#define  LIC_PRO_BIT 28
		#define  LIC_IPOD_BIT 59

		//	Note to developers.  the new 64-bit licensing breakdown:
		//	2 BYTEs (bits 24-39) for common licensed items.
		//	12 bits for application licensing (bits 20-23, and bits 40-47).
		//	36 bits for filter specific items (0-19, and 48-64).  
		#define LIC_OPTION_RESERVED_1			UINT64(0x0000000080000000)		// please don't you this bit, it causes nmake overflow
		#define LIC_OPTION_RESERVED_2			UINT64(0x8000000000000000)		// please don't you this bit, it causes nmake overflow
		// The following are bits that could be used for new license
		#define UNUSED_LIC_OPTION_NUM04         UINT64(0x0000080000000000)
		//Don't use these key(Reserved)
		#define UNUSED_LIC_OPTION_NUM03         UINT64(0x0000200000000000)
		#define UNUSED_LIC_OPTION_NUM02         UINT64(0x0000400000000000)
		#define UNUSED_LIC_OPTION_NUM01         UINT64(0x0000800000000000)



		// common license items These are only license items that all apps will use
		#define LIC_OPTION_COMMON_MASK			UINT64(0x0f0000ffff000000)
		#define LIC_OPTION_NOEXPIRE_VALUE		UINT64(0x0000000001000000)
		#define LIC_OPTION_NOTIMEOUT_VALUE		UINT64(0x0000000002000000)
		#define LIC_OPTION_REGISTERED_VALUE		UINT64(0x0000000004000000)		// set when product is registered
		#define LIC_OPTION_NOT_LITE_VALUE		UINT64(0x0000000008000000)
		#define LIC_OPTION_PRO_EDITION			UINT64(0x0000000040000000)
		#define LIC_OPTION_IPOD					UINT64(0x0400000000000000)


	#else // #ifdef INSTALLSHIELD
	// This block is used for InstallShield. Since InstallShield doesn't support 64 bits variable,
	// the license will be splitted into a Hi-portion bits (32 bits long) and a Lo-portin bits (32 bits long)
	
		// [Common]
		// note: this block is for Lo portion bits
		#define LIC_OPTION_COMMON_MASK_HI		0x000000ff
		// add common license bits here
		// Note: This block is for the Lo portion bits for Installshield
		#define LIC_OPTION_COMMON_MASK_LO		0xff000000
		#define LIC_OPTION_NOEXPIRE_VALUE		0x01000000
		#define LIC_OPTION_NOTIMEOUT_VALUE		0x02000000
		#define LIC_OPTION_REGISTERED_VALUE		0x04000000		// set when product is registered
		#define LIC_OPTION_NOT_LITE_VALUE		0x08000000
		#define LIC_OPTION_PRO_EDITION			0x40000000

		// Note: This block is for the Hi portion bits for Installshield
		#define LIC_OPTION_IPOD				0x04000000


	#endif // #ifdef INSTALLSHIELD


#else // USE_DCMLICENSE

// This is required for InstallShield to be able to construct these options

//	Note to developers.  The new licensing provides 1 BYTE (bits 24-31) for 
//  common licensed items, and 4 bits for application bits (bits 20-23), and 
//  20 bits for filter specific items (bits 0-19).  
//  Each app will get its own 1 DWORD license key.

// common license items These are only license items that all apps will use
#define LIC_OPTION_NOEXPIRE_VALUE		0x01000000
#define LIC_OPTION_NOTIMEOUT_VALUE		0x02000000
#define LIC_OPTION_REGISTERED_VALUE		0x04000000		// set when product is registered
#define LIC_OPTION_NOT_LITE_VALUE		0x08000000
#define LIC_OPTION_PRO_EDITION			0x40000000

#define LIC_OPTION_IPOD				0x04000000

#endif

#endif // __LICENSE_OPT_H_
